package nz.ac.massey.cs.se400_2013.ass3.gui;

import java.awt.event.ActionEvent;

import javax.swing.JPanel;

import nz.ac.massey.cs.se400_2013.ass3.EditorPlugin;

public class SaveHandler extends Handler{
	private EditorPlugin editor;
	public SaveHandler(SideTree sideTree, EditorPlugin editor) {
		super(sideTree);
		this.editor = editor;
	}
	
	public void actionPerformed(ActionEvent e) {
		System.out.println("saved");
		((EditorPlugin)editor).saveObject();
		sideTree.saveChanges();
	}
}
